﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using SummerTraining.OO;

namespace SummerTraining
{
    public partial class SearchForm : Form
    {
        public SearchForm()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            StudentDao dao = new StudentDao();
            List<Student> list = dao.FindStudentByName(textBox1.Text);
            dataGridView1.DataSource = list;
        }

        private void dataGridView1_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            DataGridViewColumn c = dataGridView1.Columns[e.ColumnIndex];
            MessageBox.Show(c.GetType().ToString());
        }
    }
}
